From b594989efbd405eaec335e03cdc8dfb8448abcfa Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 19 Jan 2004 18:10:29 +0000 Subject: [PATCH] Don't output bounding box if we couldn't compute them (i.e. tracks and routes) --- gpsbabel/gpx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gpsbabel/gpx.c b/gpsbabel/gpx.c index 975e7f5b7..b05518b57 100644 --- a/gpsbabel/gpx.c +++ b/gpsbabel/gpx.c @@ -1134,12 +1134,14 @@ gpx_write(void) fprintf(ofd, "xmlns=\"http://www.topografix.com/GPX/1/0\"\n"); fprintf(ofd, "xsi:schemaLocation=\"%s\">\n", xsi_schema_loc ? xsi_schema_loc : DEFAULT_XSI_SCHEMA_LOC); - gpx_write_time( now, "time" ); + gpx_write_time( now, "time" ); waypt_compute_bounds(&bounds); - fprintf(ofd, "\n", - bounds.min_lat, bounds.min_lon, - bounds.max_lat, bounds.max_lon); + if (bounds.max_lat < 360) { + fprintf(ofd, "\n", + bounds.min_lat, bounds.min_lon, + bounds.max_lat, bounds.max_lon); + } waypt_disp_all(gpx_waypt_pr); gpx_track_pr(); gpx_route_pr(); -- 2.30.2